package org.JQbitorrentClinet.request.torrentmanagement;

import com.google.gson.reflect.TypeToken;
import lombok.Builder;
import org.JQbitorrentClinet.base.BaseGetUrlEncodedParam;

import java.util.List;

@Builder
public class GetTorrentPiecesStatesParam extends BaseGetUrlEncodedParam {
    String hash;

    public GetTorrentPiecesStatesParam(String hash) {
        this.hash = hash;
        responseType = new TypeToken<List<Long>>() {
        }.getType();
    }

    @Override
    public String getApiUrl() {
        return "/api/v2/torrents/pieceStates";
    }
}
